package com.umakr.ax.common.mapper;

import com.baomidou.mybatisplus.plugins.Page;
import com.umakr.ax.common.model.LotteryResult;
import com.umakr.ax.common.model.Msg;
import com.umakr.ax.common.vo.InteractiveLotteryVO;
import com.umakr.ax.core.base.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author zj
 * @since 2018-5-5
 */
public interface LotteryResultMapper extends BaseMapper<LotteryResult> {
    List<LotteryResult> listLotteryResult(InteractiveLotteryVO interactiveLotteryVO);

    Page<Map<String,Object>> listLotteryResultById(@Param("lotteryId") Long lotteryId);

    Integer totalPeople(InteractiveLotteryVO interactiveLotteryVO);

    void saveLotteryResult(LotteryResult lr);

    List queryUserMessageById(Msg resultMsg);

    void deleteByLotteryId(@Param("lotteryId") Long lotteryId);

    void updateInformStatusById(@Param("resultId") Long resultId);

    List<Map<Object,String>> listGroupByUserId(InteractiveLotteryVO interactiveLotteryVO);

    List<LotteryResult> queryLotteryInfoByUserId(@Param("msgId") Long msgId,@Param("userId") Long userId);

    List<LotteryResult> queryLotteryInfo(@Param("msgId") Long msgId);
}
